#ifndef __DK_UCORE_CONF__
#define __DK_UCORE_CONF__

#define DK_TIMER_COUNT 128

struct dde_kit_timer
{
	 int          free;
	 int          timer;
	 void         (*fn)(void *);
	 void         *priv;
};

#define DK_THREAD_NAME_LEN 20
#define DK_THREAD_COUNT    128

struct dde_kit_thread
{
	 int  free;
	 char name[DK_THREAD_NAME_LEN + 1];
	 int  pid;
	 void *data;
};

#include <dde_kit/pcireg.h>
enum { pci_res_bus, pci_res_mem, pci_res_io, pci_res_max };

struct pci_bus_t;

struct pci_dev_t
{
	 uint32_t dev;
	 uint32_t func;

	 uint32_t dev_id;
	 uint32_t dev_class;

	 uint32_t reg_base[6];
	 uint32_t reg_size[6];
	 uint8_t irq_line;
};

struct pci_func_t
{
	 struct pci_bus_t *bus;	// Primary bus for bridges
	 struct pci_dev_t dev;	 
};

struct pci_bus_t
{
	 struct pci_func_t *parent_bridge;
	 uint32_t busno;
};

/* intr */

struct dk_irq_hook_list
{
	 int attach;
	 
	 int irq;
	 int dk_thread_index;
	 
	 void (*thread_init)(void *);
	 void (*handler)(void *);
	 void *priv;
	 int  pid;

	 struct dk_irq_hook_list *prev, *next;
};

#endif
